<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: User
  Date: 2024/5/17
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>Title</title>
    </head>
    <body>
        <a href="${pageContext.request.contextPath}/findMyOrders.order">返回我的订单</a>
        <table>
            <thead>
                <tr>
                    <th>序号</th>
                    <th>商品名称</th>
                    <th>商品数量</th>
                    <th>商品总价</th>
                </tr>
            </thead>
            <tbody>

                <c:forEach items="${order.items}" var="item" varStatus="i">
                    <tr>
                        <td>${i.index+1}</td>
                        <td>${item.product.name}</td>
                        <td>${item.num}</td>
                        <td>${item.price}</td>
                    </tr>
                </c:forEach>
            </tbody>
        </table>
        <br>
        共${order.count}条
        <br>
        总计:${order.price}
    </body>
</html>
